package com.edu.glutdataconvertserver.controller;

import com.edu.glutdataconvertserver.servicce.TransformService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author gtl
 * @version 1.0
 * @date 2020/10/19  14:10
 */
@RestController
@RequestMapping("/data")
public class DataController {

    @Resource
    private TransformService transformService;

    @GetMapping("/yhMm")
    public Integer yhMm() {
        transformService.transforYhMm();
        return 1;
    }

    /**
     * 1
     * time:1min
     *
     * @return
     */
    @GetMapping("/xy")
    public Integer xy() {
        transformService.transformXy();
        return 1;
    }

    /**
     * 2
     * time:1min
     *
     * @return
     */
    @GetMapping("/kc")
    public Integer kc() {
        transformService.transformKc();
        return 1;
    }

    /**
     * 3
     * time:1min
     *
     * @return
     */
    @GetMapping("/ls")
    public Integer ls() {
        transformService.transformLs();
        return 1;
    }

    /**
     * 4
     * time:5min
     *
     * @return
     */
    @GetMapping("/xs")
    public Integer xs() {
        transformService.transformXs();
        return 1;
    }

    /**
     * 5
     * time:2min
     *
     * @return
     */
    @GetMapping("/bj")
    public Integer bj() {
        transformService.transformBj();
        return 1;
    }

    /**
     * 6
     * time:1min
     *
     * @return
     */
    @GetMapping("/kw")
    public Integer kw() {
        transformService.transformKw();
        return 1;
    }

    @GetMapping("/pkxq")
    public Integer pkxq() {
        transformService.transformPkxq();
        return 1;
    }

    @GetMapping("/test")
    public Integer test() {
        transformService.transform();
        return 1;
    }
}
